package liwen.zhao.controller;

import liwen.zhao.common.jd.vo.PicUploadResult;
import liwen.zhao.service.PicUploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class FileUpController {
    @Autowired
    PicUploadService picUploadService;
    @RequestMapping("file/doFileUp")
    public PicUploadResult doFileUp(@RequestParam("file_data") MultipartFile pic){
        return  picUploadService.doFileUp(pic);
    }
    @RequestMapping("file/test")
    public String test(){
        return "haha";
    }
}
